package model

import (
	"log"
	"monitor_serve/initialize"
)

func Init() {

	initialize.DB.AutoMigrate(&User{})
	initialize.DB.AutoMigrate(&FileInfo{})
	initialize.DB.AutoMigrate(&UserToken{})
	initialize.DB.AutoMigrate(&UserFile{})
	//初始化数据

	err := InitializeUserData(initialize.DB)
	if err != nil {
		log.Fatalf("failed to initialize category data: %v", err)
	}
}
